package com.siyu.dao;

import com.siyu.model.Files;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface FileRepository extends JpaRepository<Files,Long> {

    @Query(value = "SELECT * FROM File WHERE userId = :userId", nativeQuery = true)
    List<Files> findByUserId(@Param("userId") String userId);
}
